//----------DDVDAQ.hh----------//
#ifndef _DDVDAQ_HEADER_
#define _DDVDAQ_HEADER_

#include <string>
#include <set>
#include <map>

using namespace std;

const string binary("BINARY"); //define binary/ascii strings
const string ascii("ASCII"); //for comparison with data_type

class DDVDAQ 
{
public:
  virtual void initialize(void)=0;
  virtual void acquire_data(void)=0; 
  
  class general_config
  {
  public:
    //==========Sets and gets==========//
    virtual void load_config(void)=0;
    void set_base_filename(string base_filename_arg);
    string get_base_filename(void);
    
    void set_output_type(string output_type_arg);
    string get_output_type(void);
    
    virtual int add_channel(int channel_arg)=0;
    virtual int remove_channel(int channel_arg)=0;
    set<int>* get_channels(void);		
    
    void set_num_traces_requested(unsigned int num_traces_requested_arg);
				unsigned int get_num_traces_requested(void);
    //=================================//
    
    
  protected:
    string base_filename;
    string output_type;
    set<int> channels;
    unsigned int num_traces_requested;
  };	
  
  class general_header
  {
  public:
    virtual void write_header(fstream* data_file, set<int> channels) = 0;
    
    //==========Sets and gets==========//
    //---All Channels---//
    void set_num_traces(unsigned int num_traces_arg);
    unsigned int get_num_traces(void);
    void set_num_channels(unsigned int num_channels_arg);
    unsigned int get_num_channels(void);
    //---Channel Specific---//
    void set_samples_per_trace(int channel, unsigned int samples_per_trace_arg);
    unsigned int get_samples_per_trace(int channel);
    void set_bits_per_sample(int channel, unsigned int bits_per_sample_arg);
    unsigned int get_bits_per_sample(int channel);
    void set_time_per_sample(int channel, double time_per_sample_arg);
    double get_time_per_sample(int channel);
    void set_trigger_offset(int channel, double trigger_offset_arg);
    double get_trigger_offset(int channel);
    void set_volts_per_sample(int channel, double volts_per_sample_arg);
    double get_volts_per_sample(int channel);
    void set_voltage_offset(int channel, double voltage_offset_arg);
    double get_voltage_offset(int channel);
    //=================================//
    
  protected:
    //---All Channels---//
    unsigned int num_traces;
    unsigned int num_channels;
    
    //---Channel Specific---//
    map<int, unsigned int> samples_per_trace;
    map<int, unsigned int> bits_per_sample;
    map<int, double> time_per_sample;
    map<int, double> trigger_offset;
    map<int, double> volts_per_sample;
    map<int, double> voltage_offset;
  };
  
};	


#endif
//----------DDVDAQ.hh----------//
